/**
 * @author 黄波
 * 创建日期：2011Sep 6, 2011
 * TODO// N/A
 */
package com.platform.manager.action;

import java.util.List;

import com.platform.manager.bo.ModuleBo;
import com.platform.manager.bo.PowerBo;
import com.platform.pojo.Module;
import com.platform.pojo.Power;

//点击树访问权限<->模块对应关系页面
public class LoadPowerModulesAction extends ManagerSupport {

	private String nodeId;	//树节点ID
	private String nodeText;	//树节点名称
	private List<Power> powers;	//所有权限信息
	private List<Module> modules;	//所有模块信息
	/**
	 * @return the nodeId
	 */
	public String getNodeId() {
		return nodeId;
	}
	/**
	 * @param nodeId the nodeId to set
	 */
	public void setNodeId(String nodeId) {
		this.nodeId = nodeId;
	}
	/**
	 * @return the nodeText
	 */
	public String getNodeText() {
		return nodeText;
	}
	/**
	 * @param nodeText the nodeText to set
	 */
	public void setNodeText(String nodeText) {
		this.nodeText = nodeText;
	}
	/**
	 * @return the powers
	 */
	public List<Power> getPowers() {
		return powers;
	}
	/**
	 * @param powers the powers to set
	 */
	public void setPowers(List<Power> powers) {
		this.powers = powers;
	}
	/**
	 * @return the modules
	 */
	public List<Module> getModules() {
		return modules;
	}
	/**
	 * @param modules the modules to set
	 */
	public void setModules(List<Module> modules) {
		this.modules = modules;
	}
	@Override
	public String execute() throws Exception {
		ModuleBo moduleBo = new ModuleBo();
		modules = moduleBo.getSuperModule();
		PowerBo powerBo = new PowerBo();
		powers = powerBo.getPowers();
		nodeText = new String(nodeText.getBytes("iso-8859-1"), "utf-8");
		return SUCCESS;
	}
	
}
